<ion-view view-title="{{'GLBG' == entry ? '工程量变更' : '变更审核'}}" devin-hide-tabs="true">
  <ion-nav-buttons side="right">
    <span class="nav-right-button" ng-if="'GLBG' == entry" ng-click="add()">
      <i class="nav-right-button ion-plus-round"></i>
    </span>
  </ion-nav-buttons>
  <ion-content id="qutyChange" class="my-bg" style="margin-bottom: 60px">
    <style type="text/css">
      #engineering, #submit{
        width: 100%;
        height: 60px;
        line-height: 60px;
        border: 1px solid #cccccc;
        background-color: #FFFFFF;
      }

      #engineering button, #submit button{
        border:0px;
        border-radius:4%;
        color: #FFFFFF;
        font-size: 18px;
      }

      #submit button{
        width: 30%;
        height: 40px;
      }
    </style>
    <!-- list -->
    <div ng-repeat="value in spmsEngineerChangeList">
      <ul>
        <!-- title -->
        <li class="project-spms-title" style="padding-left: 4px;">
          <span>{{$index + 1 + "."}}变更内容</span>
          <i class="icon ion-android-delete" ng-if="'GLBG' == entry" style="float: right;margin-right: 18px;" ng-click="del($index)"></i>
        </li>
        <!-- content -->
        <li style="height: 100%;padding: 10px;">
          <textarea style="margin: 0px auto;width: 85%;overflow:hidden;resize:none;" ng-readonly="'SHBG' == entry" rows="5" placeholder="请填写变更内容" ng-trim="true" ng-model="value.changeText"></textarea>
        </li>

        <!-- title -->
        <li class="project-spms-title" style="padding-left: 4px;">工程量</li>
        <!-- content -->
        <li style="height: 100%;padding: 10px;">
          <textarea style="margin: 0px auto;width: 85%;overflow:hidden;resize:none;" ng-readonly="'SHBG' == entry" rows="3" placeholder="请填写工程量" ng-trim="true" ng-model="value.engineering"></textarea>
        </li>
        <li ng-click="forwardProjectLog(project)" ng-if="project.engineerStatus != 'SUBMIT' && project.engineerStatus != ''" class="project-spms-title" style="padding-left: 4px;">
          <span class="project-spms-label" style="color: #4E4E4E">方案状态</span>
          <span class="project-spms-info" style="float: right;padding-right: 20px;width: 50%;color: #9e9e9e;text-align: right">{{project.engineerStatus == 'Y' ? "通过":"拒绝"}}</span>
        </li>

        <!-- 拍照 -->
        <li style="width: 100%; height: 50px; padding: 10px" ng-click="goPhoto($index, value.imageId ,'GLBG', 'SHBG' == entry)">
          <div style="width: 100%; height: 100%;line-height: 30px">
            <img src="img/icon-pic.png" style="margin-top: 3px;max-width: 24px;max-height: 24px;width: 100%;height: 100%;border-radius: 50%;white-space: nowrap;float: left;" alt="" />
            <span style="vertical-align: middle;font-size: 16px;color: #4E4E4E;float: left;padding-left: 5px;">上传图片</span>
            <i class="icon ion-chevron-right icon-accessory project-spms-accessory" style="font-size: 14px;max-height: 24px;float: right;color: #CCCCCC;"></i>
            <span style="margin-right: 15px;float: right; color: #CCCCCC">{{value.GLBG == 'HAS_IMAGE' ? '查看图片' : '请选择'}}</span>
          </div>
        </li>
      </ul>
      <br />
    </div>

    <div class="padding-bottom"></div>
  </ion-content>

  <!-- 填写中 -->
  <div id="engineering" class="tabs" ng-if="'GLBG' == entry" style="padding: 5px; text-align: center;">
    <button class="spms-blue-bg" style="width: 50%;height: 50px;" ng-click="submit()">提交</button>
  </div>

  <!-- 审批中 -->
  <div id="submit" class="tabs" ng-if="'SHBG' == entry" style="padding: 10px; display: -webkit-flex; justify-content: space-around;">
    <button class="spms-red-bg" style="float: left;" ng-click="reject()">拒绝</button>
    <button class="spms-blue-bg" style="float: right;" ng-click="agree()">同意</button>
  </div>
</ion-view>
